{{!--
SPDX-FileCopyrightText: 2022-2025 trobonox <hello@trobo.dev>

SPDX-License-Identifier: Apache-2.0
--}}

<html>

<head>
    <style>
        h3 {
            @apply font-bold text-3xl pb-2
        }

        pre {
            @apply mb-8
        }
    </style>
</head>

<body>
    <main class="container overflow-auto pl-8 pt-8">
        <div class="intro">
            <h1 class="mb-2 text-4xl font-bold">
                Third Party Licenses
            </h1>
            <p class="mb-4">
                This page lists the licenses of the projects used in kanri.
            </p>
        </div>

        <h2 class="text-lg italic">
            Overview of licenses:
        </h2>
        <ul class="licenses-overview mb-8">
            {{#each overview}}
            <li><a href="#{{id}}">{{name}}</a> ({{count}})</li>
            {{/each}}
        </ul>

        <h2 class="text-lg italic">
            All license text:
        </h2>
        <ul class="licenses-list">
            {{#each licenses}}
            <li class="license">
                <h3 id="{{id}}">{{name}}</h3>
                <h4>Used by:</h4>
                <ul class="license-used-by">
                    {{#each used_by}}
                    <li><a href="{{#if crate.repository}} {{crate.repository}} {{else}} https://crates.io/crates/{{crate.name}} {{/if}}">{{crate.name}} {{crate.version}}</a></li>
                    {{/each}}
                </ul>
                <pre class="license-text">{{text}}</pre>
            </li>
            {{/each}}
        </ul>
    </main>
</body>

</html>
